#ifndef __WIZ_BNF_PARSER_CHAR_RANGE_HPP__SHANHAOBO_19800429__
#define __WIZ_BNF_PARSER_CHAR_RANGE_HPP__SHANHAOBO_19800429__

#include "../../Base/Cast/WizBaseCastStatic.hpp"
#include "./WizBNFParserChar.hpp"

namespace Wiz
{
    namespace BNF
    {
        namespace Parser
        {
            namespace Char
            {
                namespace Range
                {
                    template <typename CharT = ::Wiz::Char::Type>
                    struct Type : public ::Wiz::BNF::Parser::Char::Type<Type<CharT>>
                    {
                        Type(CharT const& Frst, CharT const& Lst) : m_First(Frst), m_Last(Lst)
                        {
                            WIZ_ASSERT(Frst < Lst);
                        }

                        template <typename CharT2>
                        ::Wiz::Bool::Type Test(CharT2 Chr) const
                        {
                            return !(static_cast<CharT>(Chr) < m_First) && !(m_Last < static_cast<CharT>(Chr));
                        }
                        CharT   m_First;
                        CharT   m_Last;
                    }; /// end of struct Type
                } /// end of namespace Range
            } /// end of namespace Char
        } /// end of namespace Parser
    } /// end of namespace BNF
} /// end of namespace Wiz

#endif /*__WIZ_BNF_PARSER_CHAR_RANGE_HPP__SHANHAOBO_19800429__*/
